#ifndef NUMERICPROPERTYBASE_H
#define NUMERICPROPERTYBASE_H
#include <Gwen/Controls/Property/NumericUpDown.h>
namespace StomperLib {
namespace Controls {
namespace Property {
class NumericPropertyBase : public Gwen::Controls::Property::NumericUpDown {
 protected:

  char* m_DataPointer;
  void OnChange( )
  {
    this->CopyValueToData( );
  }

 public:

  GWEN_CONTROL_INLINE( NumericPropertyBase, Gwen::Controls::Property::NumericUpDown )
  {
    this->m_DataPointer = NULL;
    m_NumericUpDown->onChanged.Add( this, &NumericPropertyBase::OnChange );
  }
  void SetDataPointer( char* data )
  {
    this->m_DataPointer = data;
    this->CopyDataToValue( );
  }

  virtual bool CopyValueToData( ) {
    return true;
  }

  virtual void CopyDataToValue( ) {
  }

};

}
}
}
#endif // ifndef NUMERICPROPERTYBASE_H